import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import store from '@/store'
import './permission'
import 'element-ui/lib/theme-chalk/index.css'
import Navigation from '@/components/Navigation'
import Aside from '@/components/Aside'
import Pagination from '@/components/Pagination'

Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.component(Navigation.name, Navigation)
Vue.component(Aside.name, Aside)
Vue.component(Pagination.name, Pagination)

Vue.directive('title', {
  inserted: function (el, binding) {
    document.title = el.dataset.title
  }
})

new Vue({
  render: h => h(App),
  router,
  store
}).$mount('#app')
